package com.pansoft.kline.greendao;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.pansoft.kline.model.ConfigFutureBean;
import com.pansoft.kline.model.SelfSelectedBean;
import com.pansoft.kline.model.ConfigMarketBean;
import com.pansoft.kline.model.ConfigCoinBean;
import com.pansoft.kline.model.ConfigSiteBean;

import com.pansoft.kline.greendao.ConfigFutureBeanDao;
import com.pansoft.kline.greendao.SelfSelectedBeanDao;
import com.pansoft.kline.greendao.ConfigMarketBeanDao;
import com.pansoft.kline.greendao.ConfigCoinBeanDao;
import com.pansoft.kline.greendao.ConfigSiteBeanDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig configFutureBeanDaoConfig;
    private final DaoConfig selfSelectedBeanDaoConfig;
    private final DaoConfig configMarketBeanDaoConfig;
    private final DaoConfig configCoinBeanDaoConfig;
    private final DaoConfig configSiteBeanDaoConfig;

    private final ConfigFutureBeanDao configFutureBeanDao;
    private final SelfSelectedBeanDao selfSelectedBeanDao;
    private final ConfigMarketBeanDao configMarketBeanDao;
    private final ConfigCoinBeanDao configCoinBeanDao;
    private final ConfigSiteBeanDao configSiteBeanDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        configFutureBeanDaoConfig = daoConfigMap.get(ConfigFutureBeanDao.class).clone();
        configFutureBeanDaoConfig.initIdentityScope(type);

        selfSelectedBeanDaoConfig = daoConfigMap.get(SelfSelectedBeanDao.class).clone();
        selfSelectedBeanDaoConfig.initIdentityScope(type);

        configMarketBeanDaoConfig = daoConfigMap.get(ConfigMarketBeanDao.class).clone();
        configMarketBeanDaoConfig.initIdentityScope(type);

        configCoinBeanDaoConfig = daoConfigMap.get(ConfigCoinBeanDao.class).clone();
        configCoinBeanDaoConfig.initIdentityScope(type);

        configSiteBeanDaoConfig = daoConfigMap.get(ConfigSiteBeanDao.class).clone();
        configSiteBeanDaoConfig.initIdentityScope(type);

        configFutureBeanDao = new ConfigFutureBeanDao(configFutureBeanDaoConfig, this);
        selfSelectedBeanDao = new SelfSelectedBeanDao(selfSelectedBeanDaoConfig, this);
        configMarketBeanDao = new ConfigMarketBeanDao(configMarketBeanDaoConfig, this);
        configCoinBeanDao = new ConfigCoinBeanDao(configCoinBeanDaoConfig, this);
        configSiteBeanDao = new ConfigSiteBeanDao(configSiteBeanDaoConfig, this);

        registerDao(ConfigFutureBean.class, configFutureBeanDao);
        registerDao(SelfSelectedBean.class, selfSelectedBeanDao);
        registerDao(ConfigMarketBean.class, configMarketBeanDao);
        registerDao(ConfigCoinBean.class, configCoinBeanDao);
        registerDao(ConfigSiteBean.class, configSiteBeanDao);
    }
    
    public void clear() {
        configFutureBeanDaoConfig.clearIdentityScope();
        selfSelectedBeanDaoConfig.clearIdentityScope();
        configMarketBeanDaoConfig.clearIdentityScope();
        configCoinBeanDaoConfig.clearIdentityScope();
        configSiteBeanDaoConfig.clearIdentityScope();
    }

    public ConfigFutureBeanDao getConfigFutureBeanDao() {
        return configFutureBeanDao;
    }

    public SelfSelectedBeanDao getSelfSelectedBeanDao() {
        return selfSelectedBeanDao;
    }

    public ConfigMarketBeanDao getConfigMarketBeanDao() {
        return configMarketBeanDao;
    }

    public ConfigCoinBeanDao getConfigCoinBeanDao() {
        return configCoinBeanDao;
    }

    public ConfigSiteBeanDao getConfigSiteBeanDao() {
        return configSiteBeanDao;
    }

}
